package com.rzx.mybackend.event.mqRouteEvent;

import org.springframework.context.ApplicationEvent;

/**
 * MessageFailedEvent
 * mq消息失败事件
 * @author renzhexian
 * @date 2025/8/7
 */

public class MessageFailedEvent extends ApplicationEvent {
    private final String messageId;
    private final String cause;

    public MessageFailedEvent(Object source, String messageId, String cause) {
        super(source);
        this.messageId = messageId;
        this.cause = cause;
    }

    // getter 方法
    public String getMessageId() { return messageId; }
    public String getCause() { return cause; }
}